// api/member.js
import http from '@/utils/request'

/**
 * 获取员工分页数据
 * @param {Object} params - 分页参数
 */
export function getMemberList(params) {
    return http.get('/employee/page', { params })
}

/**
 * 启用/禁用员工
 * @param {Object} params - 包含员工状态和ID
 */
export function enableOrDisableEmployee(params) {
    return http.put('/employee', params)
}

/**
 * 添加员工
 * @param {Object} params - 员工信息
 */
export function addEmployee(params) {
    return http.post('/employee', params)
}

/**
 * 修改员工信息
 * @param {Object} params - 员工信息
 */
export function editEmployee(params) {
    return http.put('/employee', params)
}

/**
 * 查询员工详情
 * @param {String|Number} id - 员工ID
 */
export function queryEmployeeById(id) {
    return http.get(`/employee/${id}`)
}
